package org.hxd.employee.service;

import org.hxd.employee.dao.EmployeeDao;
import org.hxd.pojo.Dept;
import org.hxd.pojo.Employee;
import org.hxd.pojo.Job;
import org.hxd.units.PageModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    EmployeeDao employeeDao;

    @Override
    public List<Job> findAllJob() {
        return employeeDao.findAllJob();
    }

    @Override
    public List<Dept> findAllDept() {
        return employeeDao.findAllDept();
    }

    @Override
    public List<Employee> findEmployee(Employee employee, PageModel pageModel) {
        return employeeDao.findEmployee(employee,pageModel);
    }

    @Override
    public int findEmployeeCount(Employee employee) {
        return employeeDao.findEmployeeCount(employee);
    }

    @Override
    public Employee findEmployeeByid(int id) {
        return employeeDao.findEmployeeByid(id);
    }

    @Override
    public int modifyEmployee(Employee employee) {
        return employeeDao.modifyEmployee(employee);
    }

    @Override
    public int removeEmployee(Integer[] ids) {
        return employeeDao.removeEmployee(ids);
    }

    @Override
    public int addEmployee(Employee employee) {
        return employeeDao.addEmployee(employee);
    }
}
